/**
 * 
 */
package ven.spots;

/**
 * @author mattz
 *
 */
public class SpotNode {
	
	/* The string representing the spots ieee mac address */
	private String ieee;
	
	/* The state of the sunspot node
	 * -1 = Uninitialized
	 *  0 = Offline
	 *  1 = Online - Not Flashing 
	 *  2 = Online - Flashing */
	private int state;
	
	/* Spot color values */
	private int red;
	private int blue;
	private int green;
	
	/**
	 * Default constructor initializes all fields to default values
	 */
	public SpotNode() {
		ieee  = "0000.0000.0000.0000";
		state = -1;
		red = 0;
		green = 0;
		blue = 0;
	}
	
	/**
	 * Constructor to initialize SpotNode object with specific field var values.
	 * @param _ieee  - String representing the spots ieee mac address. 
	 * @param _state - The state of the sunspot node.
	 */
	public SpotNode(String _ieee, int _state) {
		ieee  = _ieee;
		state = _state;
		red = 0;
		green = 0;
		blue = 0;
	}
	
	public String toString() {
		return "MAC:  " + ieee + ",  STATE:  " + state;
	}

	public String getIeee() {
		return ieee;
	}

	public void setIeee(String ieee) {
		this.ieee = ieee;
	}

	public int getState() {
		return state;
	}

	public void setState(int state) {
		this.state = state;
	}
	
	public int getRed() {
		return red;
	}

	public void setRed(int red) {
		this.red = red;
	}

	public int getBlue() {
		return blue;
	}

	public void setBlue(int blue) {
		this.blue = blue;
	}

	public int getGreen() {
		return green;
	}

	public void setGreen(int green) {
		this.green = green;
	}
}
